import { app, BrowserWindow, shell, ipcMain } from 'electron'

const createWindow = () => {
  const win = new BrowserWindow({
    width: 1200,
    height: 800,
    alwaysOnTop: true,
  })
  win.webContents.openDevTools()
  win.loadURL('http://localhost:80/#/gameB')

  return win
}

app.whenReady().then(() => {
  createWindow()
  app.on('window-all-closed', () => {
    if (process.platform != 'darwin') app.quit
  })

  app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length == 0) {
      createWindow()
    }
  })
})
